package cn.ljy.authority.service.impl;

import cn.ljy.authority.dao.mapper.SysUserLoginLogMapper;
import cn.ljy.authority.model.SysUserLoginLog;
import cn.ljy.authority.model.query.SysUserLoginLogQuery;
import cn.ljy.authority.service.SysUserLoginLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

@Service
//@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT,timeout=36000,rollbackFor= MyRollBackException.class)
@Validated//表示开启sprint的校检框架，会自动扫描方法里的@Valid（@Valid注解一般写在接口即可）
@Slf4j
public class ISysUserLoginLogService extends IBaseService<SysUserLoginLog, SysUserLoginLogQuery> implements SysUserLoginLogService {

    @Autowired
    private SysUserLoginLogMapper mapper;

    @Override
    public int getContinuousLoginErrorNumberInToday(Integer userId) {
        return mapper.getContinuousLoginErrorNumberInToday(userId);
    }
}
